package cn.wolfcode.luowowo.common.util;

import cn.wolfcode.luowowo.common.exception.LogicException;

/**
 * 断言判断, 进行判断操作
 */
public class AssertUtil {
    public static void hasLength(String str){
        if (str == null || "".equals(str.trim())){
            throw new LogicException("输入参数不能为空");
        }
    }

    public static void isEquals(String password, String rpassword, String msg) {
        if (password == null || rpassword ==null){
            throw new LogicException("输入参数不能为空");
        }
        if(!password.equals(rpassword)){
            throw new LogicException(msg);
        }
    }
}
